let  popup = document.querySelector(".popup");
let popupBg = document.querySelector(".popupBg");

let popupLeft = document.querySelectorAll(".popupLeft div");
let popupRight = document.querySelectorAll(".popupRight div");

function mouseOver(x){
    x.style.display = 'block';
}
function mouseOut1(x) {
    x.style.display = 'none';
}
function mouseOut(x,y){
    x.style.display = 'none';
    for(let content of y){
        content.style.backgroundColor = '#fff';
        content.style.color= 'rgba(0, 0, 0, 0.7)' ;
    }
}
popupLeft.forEach((items ,index) =>{
    popupLeft[index].onmouseover = function (){
        for(let content of popupLeft){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        for(let content of popupRight){
            content.style.display = 'none';
        }
        popupLeft[index].style.color= '#000' ;
        popupLeft[index].style.backgroundColor = '#f6f6f6';
        popupRight[index].style.display = 'block';
    }
})

//智能办公弹窗
let hotActPopup = document.querySelector(".hotActPopup");

hotActPopup.onmouseover = function (){
    hotActPopup.style.display = 'block';
}

//解决方案弹窗
let solutionPopup = document.querySelector(".solutionPopup");
let solutionPopupA = document.querySelectorAll(".solutionPopupA");

solutionPopupA.forEach((items,index) =>{
    solutionPopupA[index].onmouseover = function (){
        for(let content of solutionPopupA){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        this.style.color = '#005EFF';
        this.style.backgroundColor = '#f6f6f6';
    }
})
/*支持与服务弹窗*/
let supportPopup = document.querySelector(".supportPopup");
let supportPopupA = document.querySelectorAll(".supportPopupA");


supportPopupA.forEach((items,index) =>{
    supportPopupA[index].onmouseover = function (){
        for(let content of supportPopupA){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        items.style.color = '#005EFF';
        items.style.backgroundColor = '#f6f6f6';
    }
})
// 中文弹窗
let chinaPopup = document.querySelector(".chinaPopup");
let chinaPopupA = document.querySelectorAll(".chinaPopupA");

chinaPopupA.forEach( (items,index) =>{
    chinaPopupA[index].onmouseover = function (){
        for(let content of chinaPopupA){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        items.style.color = '#005EFF';
        items.style.backgroundColor = '#f6f6f6';
    }
})